package cn.swh.guguanjia.service.impl;

import cn.swh.guguanjia.entity.Statute;
import cn.swh.guguanjia.mapper.StatuteMapper;
import cn.swh.guguanjia.service.StatuteService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class StatuteServicelmpl extends BaseServicelmpl<Statute,Long> implements StatuteService {

    @Autowired
    StatuteMapper mapper;

    @Override
    public PageInfo<Statute> selectPage(int pageNum, int pageSize, Map<String, Object> map) {
        PageHelper.startPage(pageNum, pageSize);
        List<Statute> examines = mapper.selectPage(map);
        PageInfo<Statute> pageInfo = new PageInfo<>(examines);
        return pageInfo;
    }
}
